package com.example.anew.journey.mynewjourney.firstchangelogic.firstChangeFeedBack;

import android.view.View;
import android.widget.EditText;
import android.widget.Toast;

import com.example.anew.journey.mynewjourney.R;
import com.example.anew.journey.mynewjourney.base.FirstChangeAllBaseActivity;
import com.example.anew.journey.mynewjourney.firstchangelogic.firstChangeFeedBack.persenter.FirstChangeFeedBackPersenter;
import com.example.anew.journey.mynewjourney.firstchangelogic.firstChangeFeedBack.view.ISFirstChangeFeedBackView;

/**
 * 杭州惟君医疗科技有限公司14
 * Created by 20433 on 2018/3/16
 */

public class FirstChangeFeedBackActivity extends FirstChangeAllBaseActivity implements ISFirstChangeFeedBackView {

    private EditText editText;

    private FirstChangeFeedBackPersenter mFirstChangeFeedBackPersenter = new FirstChangeFeedBackPersenter(this);
    /**
     * @desc 主要内容的布局资源填充进来
     * */
    @Override
    protected View setMainContentView() {
        View  view = View.inflate(this, R.layout.activity_first_change_feed_back, null);
        editText = view.findViewById(R.id.editText);
        return view;
    }
    /**
     * @desc 初始化数据 onCreate()
     * */
    @Override
    protected void initView(View view) {
        displayToolbar();
        displayReturn();
        displayTvName();
        displayBtRelease();

        setToolbarBg(0xff2196F3);
        setReturnrePictuResources(R.mipmap.return_02);
        setTvNameEachAttribute(20, 0xffffffff, "意见反馈");
        setBtReleaseEachAttribute(20,0xffffffff,"发送",0x00000000);
        initDate();
    }

    private void initDate() {
    }

    /**
     * @desc Activity 销毁 释放资源
     */
    @Override
    protected void releaseResources() {

    }
    /**
     * @desc 网络监听 用于提示用户有网络了
     */
    @Override
    protected void promptHaveInternet() {

    }
    /**
     * @desc 网络监听 用于提示用户没有网络了
     */
    @Override
    protected void promptNoInternet() {

    }
    /**
     * @desc 点击分享按钮
     * */
    @Override
    protected void onClickShared() {

    }
    /**
     * @desc 点击发布按钮
     * */
    @Override
    protected void onClickRelease() {
       // finish();
        mFirstChangeFeedBackPersenter.onClickSend(this);
    }
    /**
     * @desc 点击返回按钮
     * */
    @Override
    protected void onClickReturn() {
        finish();
    }
    // 显示提示Toast信息
    @Override
    public void showToastInformation(String str) {
        Toast.makeText(this,str,Toast.LENGTH_SHORT).show();
    }
    //结束页面
    @Override
    public void finshPager() {
        finish();
    }
    //获取输入的内容
    @Override
    public String getInputContext() {
        return editText.getText().toString().trim();
    }
}
